import React, { ReactElement } from 'react'
import About from "../../components/About"
import { connect } from 'umi'

interface Props {
    name?: number
}

// 使用dva中的数据

function AddArticle({ name }: Props): ReactElement {
    return (
        <div>
            添加文章 -- { name }
            <About/>
        </div>
    )
}

const mapState = (state: any) => {
    const { about } = state
    const { name } = about
    return {
        name
    }
}

const mapDispatch = () => {
    
}

export default connect(mapState)(AddArticle)
